const fileDom = document.getElementById('file')
fileDom.onchange = function(e){
    e.preventDefault()
    // blob 用 fileReader 读取
    const file = new FileReader()
    file.readAsDataURL(e.target.files[0])
    file.onload = function(){
        const img = new Image()
        img.src = URL.createObjectURL(e.target.files[0])
        document.body.append(img)
    }
    
}